package com.atguigu.spring6.resource.service;

import com.atguigu.spring6.resource.dao.UserDao;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component("myUserService")
public class UserServiceImpl implements UserService {

    // 根据属性名（myUserDao）称注入
    @Resource
    private UserDao myUserDao;

    @Override
    public void addUserService() {
        this.myUserDao.addUserDao();
        System.out.println("UserServiceImpl.addUserService()");
    }
}
